package demo1;

import java.util.InputMismatchException;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ASUS
 * Date: 2023-12-06
 * Time: 16:55
 */

class Person{
    protected Object clone() throws CloneNotSupportedException{
        return super.clone();
    }
}
public class Test1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        try{

            int a = scanner.nextInt();
            int ret = 10/a;
            System.out.println("ret的值为："+ret);
        }catch (NullPointerException e){
            System.out.println("我捕获了空指针异常！");
        }catch (ArithmeticException e){
            System.out.println("我捕获了ArithmeticException异常！");
        }catch (InputMismatchException e){
            System.out.println("输入的参数有异常！");
        }
        finally {
            scanner.close();
            System.out.println("finally执行了!");
        }
        System.out.println("after");
    }

}
